package com.demo.proxy;

public class CarTimeProxy implements Moveable {
    private Moveable car;

    public CarTimeProxy(Moveable car) {
        this.car = car;
    }

    @Override
    public void move() {
//        long starttime = System.currentTimeMillis();
//        System.out.println("汽车开始行驶...");
        car.move();
//        long endtime = System.currentTimeMillis();
//        System.out.println("汽车结束行驶... 汽车行驶时间：" + (endtime - starttime) + "ms");

    }
}
